<?php
require_once 'dbfunc.php';
require_once 'functions.php';
init_user();
if($_POST['act']=="flower"){
	$postid=$_POST['postid'];
	$flowers=get_post_addi($postid, "flower");
	if($userid!=-1)
	    $send_user=$userid;
	else
		$send_user=$_SERVER["REMOTE_ADDR"];
	if($flowers=='')$flowers=$send_user;
	else{
		if(strpos($flowers, $send_user)===false){
			$flowers=$flowers.",".$send_user;
		}
	}
	$ret=count(explode(',', $flowers));
	set_post_addi($postid, "flower", $flowers);
	echo $ret;
	exit();
}
?>